
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpImGroup.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpImGroupForm"
 */
public class CcpImGroupForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cigGuid = null;
   private java.lang.String _ciuGuid = null;
   private java.lang.String _cigUsers = null;
   private java.lang.String _cigName = null;
   private java.lang.Integer _cigNum = null;
   private java.lang.String _cigDate = null;
   private java.lang.String _cigOrder = null;
   private java.lang.String _cigOther = null;
   private java.lang.String _cigResv1 = null;
   private java.lang.String _cigResv2 = null;
   private java.lang.String _cigResv3 = null;

   /**
    * Standard constructor.
    */
   public CcpImGroupForm() {
   }

   /**
    * Returns the cigGuid
    *
    * @return the cigGuid
    */
   public java.lang.String getCigGuid() {
      return _cigGuid;
   }

   /**
    * Sets the cigGuid
    *
    * @param cigGuid the new cigGuid value
    */
   public void setCigGuid(java.lang.String cigGuid) {
      _cigGuid = cigGuid;
   }
   /**
    * Returns the ciuGuid
    *
    * @return the ciuGuid
    */
   public java.lang.String getCiuGuid() {
      return _ciuGuid;
   }

   /**
    * Sets the ciuGuid
    *
    * @param ciuGuid the new ciuGuid value
    */
   public void setCiuGuid(java.lang.String ciuGuid) {
      _ciuGuid = ciuGuid;
   }
   /**
    * Returns the cigUsers
    *
    * @return the cigUsers
    */
   public java.lang.String getCigUsers() {
      return _cigUsers;
   }

   /**
    * Sets the cigUsers
    *
    * @param cigUsers the new cigUsers value
    */
   public void setCigUsers(java.lang.String cigUsers) {
      _cigUsers = cigUsers;
   }
   /**
    * Returns the cigName
    *
    * @return the cigName
    */
   public java.lang.String getCigName() {
      return _cigName;
   }

   /**
    * Sets the cigName
    *
    * @param cigName the new cigName value
    */
   public void setCigName(java.lang.String cigName) {
      _cigName = cigName;
   }
   /**
    * Returns the cigNum
    *
    * @return the cigNum
    */
   public java.lang.Integer getCigNum() {
      return _cigNum;
   }

   /**
    * Sets the cigNum
    *
    * @param cigNum the new cigNum value
    */
   public void setCigNum(java.lang.Integer cigNum) {
      _cigNum = cigNum;
   }
   /**
    * Returns the cigDate
    *
    * @return the cigDate
    */
   public java.lang.String getCigDate() {
      return _cigDate;
   }

   /**
    * Sets the cigDate
    *
    * @param cigDate the new cigDate value
    */
   public void setCigDate(java.lang.String cigDate) {
      _cigDate = cigDate;
   }
   /**
    * Returns the cigOrder
    *
    * @return the cigOrder
    */
   public java.lang.String getCigOrder() {
      return _cigOrder;
   }

   /**
    * Sets the cigOrder
    *
    * @param cigOrder the new cigOrder value
    */
   public void setCigOrder(java.lang.String cigOrder) {
      _cigOrder = cigOrder;
   }
   /**
    * Returns the cigOther
    *
    * @return the cigOther
    */
   public java.lang.String getCigOther() {
      return _cigOther;
   }

   /**
    * Sets the cigOther
    *
    * @param cigOther the new cigOther value
    */
   public void setCigOther(java.lang.String cigOther) {
      _cigOther = cigOther;
   }
   /**
    * Returns the cigResv1
    *
    * @return the cigResv1
    */
   public java.lang.String getCigResv1() {
      return _cigResv1;
   }

   /**
    * Sets the cigResv1
    *
    * @param cigResv1 the new cigResv1 value
    */
   public void setCigResv1(java.lang.String cigResv1) {
      _cigResv1 = cigResv1;
   }
   /**
    * Returns the cigResv2
    *
    * @return the cigResv2
    */
   public java.lang.String getCigResv2() {
      return _cigResv2;
   }

   /**
    * Sets the cigResv2
    *
    * @param cigResv2 the new cigResv2 value
    */
   public void setCigResv2(java.lang.String cigResv2) {
      _cigResv2 = cigResv2;
   }
   /**
    * Returns the cigResv3
    *
    * @return the cigResv3
    */
   public java.lang.String getCigResv3() {
      return _cigResv3;
   }

   /**
    * Sets the cigResv3
    *
    * @param cigResv3 the new cigResv3 value
    */
   public void setCigResv3(java.lang.String cigResv3) {
      _cigResv3 = cigResv3;
   }

   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCigGuid() == null) {
         errors.add("cigGuid", new ActionError("error.cigGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
